﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Team4Mock.Entity
{
    public class AddressEntity
    {
        private string postCode;
        private string address;
        private int townID;
        public AddressEntity()
        {
            this.postCode = "";
            this.address = "";
            this.townID = 0;
        }
        public AddressEntity(string postCode, string address, int townID)
        {
            this.postCode = postCode;
            this.address = address;
            this.townID = townID;
        }
        
        public string PostCode
        {
            get { return this.postCode; }
            set
            {
                if (value == null)
                    throw new Exception("postCode not allow nullvalue.");
                this.postCode = value;
            }
        }
        public string Address
        {
            get { return this.address; }
            set
            {
                if (value == null)
                    throw new Exception("address not allow nullvalue.");
                this.address = value;
            }
        }
        public int TownID
        {
            get { return this.townID; }
            set { this.townID = value; }
        }

    }
}